package com.idroc.coelacanth.core.storage.support;

import com.idroc.coelacanth.core.storage.Record;
import com.idroc.coelacanth.core.storage.StorageKey;
import com.idroc.coelacanth.core.storage.StorageValue;

/**
 * 
 * @author yuyoo (yuyoo4j@163.com)
 * @date 2009-12-15 下午02:06:07
 */
public class KeyValueWrapperRecord implements Record {
	
	private StorageKey k = null;
	
	private StorageValue v = null;
	
	public KeyValueWrapperRecord(StorageKey key, StorageValue value) {
		
		this.k = key;
		this.v = value;
	}

	public StorageKey getKey() {
		
		return k;
	}

	public StorageValue getValue() { 
		return v;
	}

	public void setKey(StorageKey key) {

		k = key;
	}

	public void setValue(StorageValue value) {
		v = value;
	}

	@Override
	public String toString() {

		StringBuilder sb = new StringBuilder();
		sb.append("KeyValueWrapperRecord[");
		sb.append("k:").append(k).append(",");
		sb.append("v:").append(v);
		sb.append("]");
		return sb.toString();
	}
}
